package com.zhou.spring.cloud.balancer.util;


import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Base64;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * @author 18576666986
 * @description
 * @createDate 2022/7/21 10:34
 */
public class AESUtil {
    private static final String KEY_ALGORITHM = "AES";
    private static final String DEFAULT_CIPHER_ALGORITHM = "AES/ECB/PKCS5Padding";

    /**
     * AES 加密操作
     *
     * @param content  待加密内容
     * @param password 加密密码
     * @return 返回Base64转码后的加密数据
     */
    public static String encrypt(String content, String password) {
        try {
            Cipher cipher = Cipher.getInstance(DEFAULT_CIPHER_ALGORITHM);// 创建密码器
            byte[] byteContent = content.getBytes("utf-8");
            cipher.init(Cipher.ENCRYPT_MODE, getSecretKey(password));// 初始化为加密模式的密码器
            byte[] result = cipher.doFinal(byteContent);// 加密
            return Base64.getEncoder().encodeToString(result);// 通过Base64转码返回
        } catch (Exception ex) {
            Logger.getLogger(AESUtil.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }

    /**
     * AES 解密操作
     *
     * @param content
     * @param password
     * @return
     */
    public static String decrypt(String content, String password) {
        try {
            // 实例化
            Cipher cipher = Cipher.getInstance(DEFAULT_CIPHER_ALGORITHM);
            // 使用密钥初始化，设置为解密模式
            cipher.init(Cipher.DECRYPT_MODE, getSecretKey(password));
            // 执行操作
            byte[] decode = Base64.getDecoder().decode(content);
            byte[] result = cipher.doFinal(decode);
            return new String(result, "utf-8");
        } catch (Exception ex) {
            Logger.getLogger(AESUtil.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }

    /**
     * 生成加密秘钥
     *
     * @return
     */
    private static SecretKeySpec getSecretKey(final String password) {
        // 返回生成指定算法密钥生成器的 KeyGenerator 对象
        KeyGenerator kg = null;
        try {
            kg = KeyGenerator.getInstance(KEY_ALGORITHM);
            // AES 要求密钥长度为 128
            // kg.init(128, new SecureRandom(password.getBytes()));
            SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG");
            secureRandom.setSeed(password.getBytes());
            kg.init(128, secureRandom);
            // 生成一个密钥
            SecretKey secretKey = kg.generateKey();
            return new SecretKeySpec(secretKey.getEncoded(), KEY_ALGORITHM);// 转换为AES专用密钥
        } catch (NoSuchAlgorithmException ex) {
            Logger.getLogger(AESUtil.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }

    public static void main(String[] args) {
        String data = "FRYH56zROCC1UKgtBMz5xPNec1Olwk04PT23qlTOBz1v8aFABvZ3Tmvve1s8ROVVLa8Zdle2jniOMM+GpyTU4LD+w7WETh84yghz8V+SzBzPMEqZjFpoOIYYG+6mFoHHIwz3rN2E45gAKk3V97TY8pWwgDgSjURPls11WAkPBo20n09WMWJKhoXeTG/P0L20v5PA/lLwOGI34si+huFSGz5XHn+LfqTBEq1P3906eyc1HoJXStVIG/gA7IgRZKag+AiAoPiM6qy6hOSK2cufw4QC7Ukwy5TUvduMvg6LjjxWNri9U/SvlLCGlb3qdYpFDbvPraijbZ87oZerdxUV9ek4Mvwc7VoeKeh9jUqUZGeq/19pDhJT9cpSlzSXTQsQ7eRg7TeLM40R7g5sSmCO67cy7bqrjvVBAH+X8OKureFmmv4J7Ek5MOD+Un0IjGUZEj+WfKd2r/lqOAT0Z33kvGdPGu8zabixiBrcqV0kSDfeoqVjEQmLwCFCJ8M+5mUY0PsyTMyAX+HU++6LSwglhcO/IyDW1TeQYCYNwjV1ksWo7kvNqNt2WR //5mH2jcyAU5FKvww+22WMFa125VmQxhtl4f5K4qCtP+xyZoHlrBa6sCwbHAS5n7v9DyJ9P/g05hB4V7RV7frzQ1GKgVuqksoWsqYx/KNKzQjCM6W+5vqKR8kCLvWmh1Bqtf6FAjC6jQEfs5/I8cQGe0rrjM/Q9v5PVh9I8xxKOZSItwUqru6/Krzo8+rpTE9ZTph9B/c8qwF8M+pEtE2jHn74/gsjUF/utkhEaaS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qBrECEhpUhzbZoiXcpg4YcCnTTSfNS5tBLLYajLaKMk7YjCebxUI0bbbxJwTeFTVbaM5Hm3+6S7nntFB51/TyrR0PY7y1i2XrVgIUiajGkme9z4Yw60ReLMzs7hOIbqkIZMoppt6yGZVw3FybDL3PbsHk3TBk2e7ahbyqY3BsoAzN5O3CrQ3EzEAB5GRvHCxo5ucml3O/pLXqFjbf5UB9wLaMikaHuV3yatFSezhVBg2aZZrY4tfxogB1JtR/P5pIr3/Ql//l7EjAcS1wujiPPnORF2Wgz8Wc66+qpDAPaXHSOfwtLLP5VJKnLNG0qoFPMaxmgWILmzO6AQ5LOAZPP4iMd4skqP1vThfKMyB28USx56cOHRvvI3WGxI6xCn9ZaknUw3ajMpZQj0fGpyeKWXJNCB0SZJhiybZd7PBjt5ErgeXOV957Rd+QDxUdVDCR77JwTlJiJwXXdCQjbsrfHkvgIssT9fjLaR9cY+O+vUbBLVx9QKA1+0ehamXp9kmybt8GddgjRfqAOLpfNhOJ5mx4ZhfIawKn5FRt90+kxWNzFThizbdeyWFfGCB9LYYyI0xIazkYJrYMrunIZIXdcUYLiHoOalq4m2f18vuRg5r68FfsfC/xc0kEgIxhO181pHXLH39Py3L1H63dvwgAEFh5qBTGmd4cyMQNMsDMrpa2eRGB0U2BuQNKUuDWtVJKUT5NIP5YnH1QyinO6HzY/MjpWPnNAa2pToS1+E5py/Q==";
        //String content1 = "这是测试数据";
        String appId = "13a3557cd6b14823921842839699e316";
        // String encryptData = AESUtil.encrypt(content1,appId);
        //System.out.println(encryptData);
        String decryptData = AESUtil.decrypt(data, appId);
        System.out.println(decryptData);
    }
}
